/*
 * Copyright (c) 2010, Nikolaus Moll
 * All rights reserved.
 */
package net.miblounge.gradecalculator.guicommon.util;

import net.miblounge.gradecalculator.guicommon.interfaces.IValidationListener;

import com.trolltech.qt.gui.QWidget;

public final class ValidationUtil {
	
	private ValidationUtil() {
	}
	
	
	public static void revalidate(final QWidget widget)
	{
		QWidget parent = widget;
		while (parent != null) {
			if (parent instanceof IValidationListener) {
				((IValidationListener)parent).revalidate();
				break;
			}
			
			parent = parent.parentWidget();
		}
	}
}
